﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    List<FileInfo> list = ViewBag.files;
    if (list == null) {
        list = new List<FileInfo>();
    }
}

<form action="/Test/Index" method="post" class="layui-form">
    <p><input type="text" placeholder="文件夹" name="path" value="@ViewBag.path" class="layui-input"/></p>
    <p><input type="text" placeholder="文件类型" name="type" value="@ViewBag.type" class="layui-input"/></p>
    <p><input type="text" placeholder="保存路径" name="save" value="@ViewBag.save" class="layui-input"/></p>
    <p><input type="text" placeholder="保存名称" name="name" value="@ViewBag.name" class="layui-input"/></p>
    <p> <input type="submit" value="查找，共：@list.Count" class="layui-btn layui-btn-danger"/></p>
</form>

<form action="/Test/Join" method="post" class="layui-form">
    <p><input type="text" placeholder="文件夹" name="path" value="@ViewBag.join" class="layui-input"/></p>
    <p> <input type="submit" value="整合" class="layui-btn layui-btn-danger"/></p>
</form>

<table>
    <tr>
        <th>名称</th>
        <th>路径</th>
    </tr>
    @{

        for (int i = 0; i < list.Count; i++) {
            <tr>
                <th>@list[i].Name</th>
                <th>@list[i].Directory</th>
            </tr>
        }
    }

</table>